package com.example.tacocloud.mapper;

import com.example.tacocloud.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select * from Users where username = #{username}")
    User findByUsername(String username);

    @Insert("insert into Users (username, passWord, fullName, street, city, state, zip, phoneNumber) values " +
            "(#{username}, #{passWord}, #{fullName}, #{street}, #{city}, #{state}, #{zip}, #{phoneNumber})")
    void saveUser(User user);
}
